extends ../layout

block main
	ul.breadcrumb
		li
			i.icon-home
		li
			i.icon-angle-right
		li
			a(href="/") 面板
		li
			i.icon-angle-right
		li
			a(href="/withdraws") 退保证金

	div(class="row-fluid sortable")
		div(class="box span12")
			div(class="box-header", data-original-title)
				h2
					i(class="halflings-icon user")
					span.break
					| 退保证金
			div.box-content
				if withdraw.isNew()
					- var action = "/withdraws?app=" + app
				else
					- var action = "/withdraws/" + withdraw.id + "?app=" + app
				form(class="form-horizontal", action="#{action}", method="post")
					fieldset
						div.control-group
							label(class="control-label", for="reason") 失败原因
							div.controls
								input(class="input-xlarge focused", id="reason", name="reason", type="text", value="#{withdraw.get('reason')}")
								<p class="help-block"></p>

						div.control-group
							label(class="control-label", for="state") 状态
							div.controls
								select(id="state", name="state")
									option(selected=withdraw.get('state') == 1, value='1') 成功
									option(selected=withdraw.get('state') == 2, value='2') 失败
								<p class="help-block"></p>

						div.form-actions
							button(type="submit", class="btn btn-primary") 保存
							button.btn 
								a(href="/withdraws?app=" + app) 取消
